/**
 * 状态管理入口
 * author: Wanghui <wangh@ciqtek.com>
 * company: ubiot.cn
 * date: 2019-08-10
 */

import Vue from 'vue'
import Vuex from 'vuex'
import { PAGE_LOADING } from '@/store/mutation-types'

import preference from '@/store/modules/preference'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    loading: false
  },
  mutations: {
    [PAGE_LOADING](state, loading) {
      state.loading = loading
    }
  },
  actions: {

  },
  modules: {
    preference
  },
  getters: {
    locale: () => preference.state.locale
  }
})
